package com.java0430;

public class Teacher extends Person {
    private String course;
    public void teach(){
       System.out.println(getName() +"在教" + course);
}

public String getCourse() {
    return course;
}

public void setCourse(String course) {
    this.course = course;
}

public Teacher(String name, int age, String gender, String course) {
    super(name, age, gender);
    this.course = course;
}

public Teacher() {
}

}

